<!-- FAQ 常见问题 -->
<template>
	<s-layout class="set-wrap" title="门店认证" :bgStyle="{ color: '#FFF' }">

		<!-- 功能卡片 -->
		<view class="detail-cell-card detail-card ss-flex-col">
			<view class="xiaqanView" v-if="state.isrz">

				<view class="xiaqanbox">营业执照： <text class="xiaqanboxText"> {{state.businessId}} </text></view>
				<view class="xiaqanbox">企业名称： <text class="xiaqanboxText"> {{state.businessName}} </text>
				</view>
				<view class="xiaqanbox">法人： <text class="xiaqanboxText"> {{state.managerName}} </text></view>
				<view class="xiaqanbox">电话： <text class="xiaqanboxText"> {{state.phone}} </text></view>
				<view class="xiaqanbox">企业类型： <text class="xiaqanboxText"> {{state.retailName}} </text></view>
				<view class="xiaqanbox">注册地址： <text class="xiaqanboxText"> {{state.storeAddress}} </text>
				</view>






			</view>
		</view>


		<s-empty v-if="!state.isrz" text="暂无认证" icon="/static/collect-empty.png" />

		<su-fixed bottom :opacity="false" bg="bg-white" placeholder :noFixed="false" :index="200">

	
			<view class="footer-box border-top ss-row-between ss-p-x-20 ss-col-center ss-reset-button">
<navigator url="plugin://rs-plugin/info-regist">
             <view class="rzclass ss-reset-button ui-BG-Main-Gradient ss-r-60 submit-btn ui-Shadow-Main  ss-margin-top-40  ">
				 
				<text>
								   
								   
								   去门店认证
				</text> 
				 
				 
			 </view>
			 
	</navigator>
			
				
			</view>

		</su-fixed>




	</s-layout>



</template>

<script setup>
	import {
		onLoad,
		onShow
	} from '@dcloudio/uni-app';
	import {
		reactive
	} from 'vue';
	import sheep from '@/sheep';
	import AuthUtil from '@/sheep/api/member/auth';
	import ArticleApi from '@/sheep/api/promotion/article';

	const plugin = requirePlugin("rs-plugin"); // 引入插件
	const state = reactive({

		isrz: false,
		isEnableUsePlugin: false,
		isGrantRetailInfo: false,
		phone: '',
		storeType: '',
		storeAddress: '',
		businessName: '',
		businessId: '',
		managerName: '',
		openid: '',
		list: [],
		loading: true,
	});
	onShow(() => {

		plugin.getRetailInfo({
			success: (value) => {
		                  
					state.isrz = value.status
					state.isEnableUsePlugin= value.data.isEnableUsePlugin
					state.isGrantRetailInfo= value.data.isGrantRetailInfo
					state.phone= value.data.phone
					state.storeType=  value.data.storeType
					state.storeAddress=  value.data.storeAddress
					state.businessName=  value.data.businessName
					state.businessId = value.data.businessId
					state.managerName= value.data.managerName
					state.openid = value.data.openid
					state.retailName = value.data.retailName
		
					const {
						code,
						data
					} = AuthUtil.authentication({
						"isEnableUsePlugin": value.data.isEnableUsePlugin,
						"isGrantRetailInfo": value.data.isGrantRetailInfo,
						"phone": value.data.phone,
						'retailName':value.data.retailName,
						"storeType": value.data.storeType,
						"storeAddress": value.data.storeAddress,
						"businessName": value.data.businessName,
						"businessId": value.data.businessId,
						"managerName": value.data.managerName,
						"openid": value.data.openid,
		
					});
		
			}
		})
		
	});
	onLoad(() => {

	

	});
</script>

<style lang="scss" scoped>
	.header {
		.title {
			font-size: 28rpx;
			font-weight: 500;
			color: #333333;
			line-height: 30rpx;
			max-width: 688rpx;
		}

		.icon {
			position: relative;
			width: 40rpx;
			height: 40rpx;

			.rectangle {
				position: absolute;
				left: 0;
				top: 0;
				width: 40rpx;
				height: 36rpx;
				background: var(--ui-BG-Main);
				border-radius: 4px;

				.num {
					width: 100%;
					height: 100%;
					font-size: 24rpx;
					font-weight: 500;
					color: var(--ui-BG);
					line-height: 32rpx;
				}
			}

			.triangle {
				width: 0;
				height: 0;
				border-left: 4rpx solid transparent;
				border-right: 4rpx solid transparent;
				border-top: 8rpx solid var(--ui-BG-Main);
				position: absolute;
				left: 16rpx;
				bottom: -4rpx;
			}
		}
	}

	.content {
		border-bottom: 1rpx solid #dfdfdf;

		.text {
			font-size: 26rpx;
			color: #666666;
		}
	}

.rzclass {
	
	height: 80rpx;
	width: 35vh;
}
	.xiaqanView {

		padding: 10rpx 24rpx 24rpx 24rpx;


	}

	.xiaqanbox {
		margin-top: 26rpx;
		color: #5E5E61;
		font-size: 26rpx;

		line-height: 34rpx;
	}

	.texbf {
		color: #5E5E61;
		font-size: 20rpx;

	}

	.xiaqanboxText {
		color: #18181A;
		font-size: 26rpx;
		line-height: 34rpx;
		font-weight: 900;
	}
</style>